package com.peas.platform.module.icims.base.mdm.controller.vo;

import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.common.core.vo.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("文件")
public class FileVo extends BaseVo {

    // （附件表）外键
    @Comment(value = "附件ID")
    @ApiModelProperty(value = "附件ID")
    private Long attachmentId;

    // 1:文件夹、2:文件
    @Comment(value = "附件类型", enumType = "AttachmentType")
    @ApiModelProperty(value = "附件类型", notes = "枚举取值:AttachmentType")
    @Size(max = 20, message = "附件类型不能超过20个字符")
    private String attachmentType;

    @Comment(value = "文件类型", dictType = "FileType")
    @ApiModelProperty(value = "文件类型", notes = "字典取值:FileType")
    @Size(max = 20, message = "文件类型不能超过20个字符")
    private String fileType;

    @Comment(value = "文件名")
    @ApiModelProperty(value = "文件名")
    @Size(max = 200, message = "文件名不能超过200个字符")
    private String fileName;

    @Comment(value = "文件大小(字节)")
    @ApiModelProperty(value = "文件大小(字节)")
    private Long fileSize;

    @Comment(value = "附件下载次数")
    @ApiModelProperty(value = "附件下载次数")
    private Integer downloads;

    @Comment(value = "附件引用次数")
    @ApiModelProperty(value = "附件引用次数")
    private Integer references;

    // （用户表）外键
    @Comment(value = "附件上传人用户ID")
    @ApiModelProperty(value = "附件上传人用户ID")
    private Long uploader;

    @Comment(value = "附件上传人姓名")
    @ApiModelProperty(value = "附件上传人姓名")
    @Size(max = 20, message = "附件上传人姓名不能超过20个字符")
    private String uploaderName;

    @Comment(value = "适用模块", enumType = "Module")
    @ApiModelProperty(value = "适用模块", notes = "枚举取值:Module")
    @Size(max = 20, message = "适用模块不能超过20个字符")
    private String module;

    // （附件表）外键
    @Comment(value = "上级附件ID")
    @ApiModelProperty(value = "上级附件ID")
    private Long parentId;

}
